package com.lebang.mapper;

import com.lebang.domain.AdRecordLog;
import com.lebang.domain.CencesAdRecordLog;
import com.lebang.domain.EarnStatusRecord;
import com.lebang.example.AdRecordLogExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * AdRecordLogMapper继承基类
 */
@Mapper
public interface AdRecordLogMapper extends MyBatisBaseDao<AdRecordLog, Integer, AdRecordLogExample> {

    List<EarnStatusRecord> selectByDate(LocalDateTime star, LocalDateTime end);

    List<CencesAdRecordLog> countByTime(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    List<CencesAdRecordLog> countSuccessByTime(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    List<CencesAdRecordLog> countFailByTime(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    List<CencesAdRecordLog> countSuccessShowByTime(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    int deleteByTime(@Param("tableName") String tableName, @Param("starTime") LocalDateTime starTime, @Param("endTime") LocalDateTime endTime);

    void insertImei(String k);

    List<CencesAdRecordLog> countFilterDownloadByTime(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    List<CencesAdRecordLog> countFilterBrowseByTime(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);
}